package com.lhy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lhy.dao.UserDao;
import com.lhy.entity.User;
import com.lhy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author：罗昊宇
 * @Package：com.lhy.service.impl
 * @Project：shiro-framwork
 * @name：UserServiceImpl
 * @Date：2024/5/9 0009  19:54
 * @Filename：UserServiceImpl
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;
    @Override
    public User selectByUsername(String username) {
        QueryWrapper<User> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("username",username);

        return  userDao.selectOne(queryWrapper);

//        return user;
    }
}
